{# Log lines as rows (ui_logs): the page renders them, and the Logs stream sends each new batch to add. Three cells: the time, the source (with ``links``, Overseer > Logs, the service in its own color linking to its page; which of its containers only when it has several; the container's full name on hover) and the line: its level as a tag when it has a tone (info, the normal case, has none), the message (the lead the time cell repeats is left out, a copy keeps it), and a JSON line's fields as muted keys and their values; the page's search marks its matches (``filter_input``). One line each, cut at the edge: a click opens a line and Wrap opens them all (``.log-line`` in input.css), which shows its traceback too, highlighted, named by where it broke in the app's own code. A warning or worse marks its row's left edge in its tone, and a debug line steps back. Each row carries what the page's filters match (``data-facet-*``: its level, service, container and application service), so they narrow it with no request (app.js). #} {% from "components/macros/layout.html" import badge, copy_icon, highlighted %} {% from "pages/overseer/_macros.html" import own_frame %} {% set _copy = "ml-1.5 align-middle text-aegis-muted hover:text-aegis-text opacity-0 group-hover/cell:opacity-100 focus:opacity-100" %} {% for row in rows %} {% set tone = tones.get(row.level) %} {{ row.at }}{{ copy_icon(row.at, _copy) }} {%- if row.app_service %}{{ links.get(row.app_service, {}).get("title", row.app_service) if links else row.app_service }}{% if links %} · {% endif %}{% endif %} {%- if links %}{% set service = links[row.page] %}{{ service.title }}{% endif %} {%- if row.source %}{{ " · " if links }}{{ row.source }}{% endif %} {{- copy_icon(row.instance, _copy) -}}
{%- if tone %}{{ badge(row.level, tone) }}{% endif -%} {{ row.message }} {%- for key, value in row.fields %}{{ key }}={{ value }}{% endfor -%} {%- if row.trace %}traceback{% endif -%} {{- copy_icon(row.copy_text, _copy) -}}
{% if row.metadata %}
{% for key, value in row.metadata %}{{ key }}={{ value }}{% endfor %}
{% endif %} {% if row.trace %}
{% set own = own_frames(row.trace) %}

Traceback{% if own %} in {{ own_frame(own[0]) }}{% endif %}{{ copy_icon(row.trace, _copy) }}

{{ highlighted(row.trace, "pytb", wrap=True)|code_frames }}
{% endif %} {% endfor %}